package com.jeff.android.lab.module.annotation.runtime;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jeff.android.lab.BaseActivity;
import com.jeff.android.lab.R;
import com.jeff.android.lab.module.annotation.runtime.annotations.ContentView;
import com.jeff.android.lab.module.annotation.runtime.annotations.InjectView;
import com.jeff.android.lab.module.annotation.runtime.annotations.OnClick;
import com.jeff.utils.ToastUtil;

@ContentView(R.layout.activity_login)
public class RuntimeTestActivity extends BaseActivity {

    @InjectView(R.id.tv)
    TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ViewInject.inject(this);

        tv.setText("我改变了文字");

//        tv.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//
//            }
//        });
    }

    @OnClick(R.id.tv)
    public void show(View v) {
        ToastUtil.show(this, "方法注入");
    }

}
